/**
 * Created by XHL on 2022-07-27.
 */

#ifndef MOVE_TEST_GAME_OBJECT_H
#define MOVE_TEST_GAME_OBJECT_H
#pragma once

#include <common.h>

namespace entity {
	using meta::Enum::Direction;
	using meta::Location;

	class GameObject {
	protected:
		meta::PInfo m_info;

	public:
		explicit GameObject(const handle::PInfo &info);

		bool move(const Direction &direction, const int &step);

		void display_self(const Location &new_location) const;

	private:

		void erase_self(const meta::Location &previous_location) const;

		void set_direction(const Direction &direction);

	};

} // entity

#endif //MOVE_TEST_GAME_OBJECT_H
